<template>
    <div>
        <el-space fill direction="vertical">
        <Search :types="allTypes" :status="allStatus"></Search>
        <Add :types="allTypes"></Add>
        <Update :types="allTypes"></Update>
        <List ></List>
    </el-space>
    </div>
</template>
<script setup>
import { ref,onMounted } from 'vue';
import {useContentStore} from '@/stores/content';
import Search from './modules/Search.vue';
import List from './modules/List.vue';
import Add from './modules/Add.vue';
import Update from './modules/Update.vue';
import { listAllType } from '@/services/type';
import { listSystemByTypeId } from '@/services/system';
const {fetchContents} = useContentStore();
const allTypes = ref([]);
const allStatus = ref([]);
// const data = ref({});
// async function show(params:any = {}) {
//     data.value = await getContents(params);
// }
onMounted(async () => {
    await fetchContents({},{});
    let res = await listAllType();
    allTypes.value = res.data;
    allStatus.value = (await listSystemByTypeId(2002)).data;
});
</script>